//
//  AppTheme.swift
//  swiftProductTemplate
//
//  Created by 刘圣洁 on 2025/6/19.
//

import UIKit

// 应用主题
struct AppTheme {
    static var instance = AppTheme()
    private init() {}
    
    var appTheme_color = AppTheme.Colors.self
    
    // 颜色
    struct Colors {
        ///APP主题色
        static let primary = UIColor.black
        ///APP次级主题色
        static let secondary = UIColor.systemGreen
        ///页面背景色
        static let background = UIColor.systemBackground
        ///主题文字色
        static let textPrimary = UIColor(hex: "#40444A")!
        ///次级文字色
        static let textSecondary = UIColor(hex: "#7F7F7F")!
        ///标签栏背景色
        static let tabbarBgColor = UIColor.systemBackground
        ///标签栏文本图标默认颜色
        static let tabbarTextIcon_default_Color = UIColor.systemGray
        ///标签栏文本图标选中颜色
        static let tabbarTextIcon_select_Color = UIColor.systemPink
        ///导航栏背景色
        static let naviBgColor = UIColor.systemBackground
        ///导航栏标题色
        static let naviTitleColor = UIColor.black
        ///导航栏返回按钮色
        static let naviBackButtonColor = UIColor.black
        ///导航栏其他按钮色
        static let navigationBarTintColor = UIColor.black
    }
    
    // 字体
    struct Fonts {
        ///页面标题 28号字体
        static let title = UIFont.systemFont(ofSize: 28, weight: .semibold)
        ///二级标题 22号字体
        static let title2 = UIFont.systemFont(ofSize: 22, weight: .regular)
        ///三级标题 20号字体
        static let title3 = UIFont.systemFont(ofSize: 20, weight: .regular)
        ///列表项标题 17号字体
        static let headline = UIFont.systemFont(ofSize: 17, weight: .regular)
        ///正文内容 17号字体
        static let body = UIFont.systemFont(ofSize: 17, weight: .regular)
        ///按钮文本 16号字体
        static let callout = UIFont.systemFont(ofSize: 16, weight: .regular)
        ///辅助说明文字 15号字体
        static let subheadline = UIFont.systemFont(ofSize: 15, weight: .regular)
        ///脚注、版权信息 13号字体
        static let footnote = UIFont.systemFont(ofSize: 13, weight: .regular)
        ///图片说明 12号字体
        static let caption1 = UIFont.systemFont(ofSize: 12, weight: .regular)
        ///次要说明文字 11号字体
        static let caption2 = UIFont.systemFont(ofSize: 11, weight: .regular)
    }
    
    // 间距
    struct Spacing {
        ///间距为8
        static let small: CGFloat = 8
        ///间距为16
        static let medium: CGFloat = 16
        ///间距为24
        static let large: CGFloat = 24
        ///间距为32
        static let xLarge: CGFloat = 32
    }
    
    // 圆角
    struct CornerRadius {
        ///圆角为4
        static let small: CGFloat = 4
        ///圆角为8
        static let medium: CGFloat = 8
        ///圆角为16
        static let large: CGFloat = 16
        ///圆角为24
        static let xLarge: CGFloat = 24
    }
}
